﻿using System.Collections;
using System.Collections.Generic;

namespace Sessionizer.Samples.Model.Imp
{
    public sealed class TeamCollection : ITeamCollection
    {
        private readonly IEnumerable<ITeam> _teams;

        public TeamCollection(IEnumerable<ITeam> teams)
        {
            _teams = teams;
        }

        public IEnumerator<ITeam> GetEnumerator()
        {
            return _teams.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }
    }
}